package com.jt.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jt.mapper.ItemCatParamMapper;
import com.jt.pojo.ItemCatParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 刘昱江
 * 时间 2021/3/31
 */
@Service
public class ItemCatParamServiceImpl implements ItemCatParamService{

    @Autowired
    private ItemCatParamMapper itemCatParamMapper;

    @Override
    public List<ItemCatParam> findItemCatParamListByType(ItemCatParam itemCatParam) {

        return itemCatParamMapper.selectList(new QueryWrapper<>(itemCatParam));
    }

    @Override
    public void updateItemCatParam(ItemCatParam itemCatParam) {

        itemCatParamMapper.updateById(itemCatParam);
    }

    @Override
    public void addItemCatParam(ItemCatParam itemCatParam) {

        itemCatParamMapper.insert(itemCatParam);
    }

    @Override
    public void deleteItemCatParamById(Integer paramId) {

        itemCatParamMapper.deleteById(paramId);
    }
}
